#include<stdio.h>
#include<string.h>

#define N 7
#define M 60001

int main() {
    int i, j, k, t, sum, n = 0, v[N], p, e, q[M]={0};
    bool w[M], flag;
    while(1) {
	for (sum = 0, i = 1; i < N; ++i) {
	    scanf("%d", v + i);
	    sum += i * v[i];
	}
	if (!sum) break;
	if (sum % 2) {
	    printf("Collection #%d:\nCan't be divided.\n\n", ++n); continue;
	}
	sum /= 2;
	memset(w, 0 , M * sizeof(bool));
	for (e = p = i = 1, flag = 0; i < N && !flag; ++i, p = e)
	{
	    for (k = 0; k < p && !flag; k++) {
		for (j = 1; j <= v[i] && !flag; j++) {
		    t = q[k] + j * i;
		    if (t < sum && !w[t]) {
			w[t] = true;
			q[e++] = t;
		    } else {
			flag = t == sum ? true : false;
			break;
		    }
		}
	    }
	}
	printf("Collection #%d:\n", ++n);
	flag ? printf("Can be divided.\n\n") : printf("Can't be divided.\n\n");
    }
    return 0;
}
